<?php
class BaseView {
	
	public function getViewByCode($code){
		trigger_error("Unimpletment action method.");
	}
	
	protected function getFailedView($code,$msg){
		return array('status'=>'falied','code'=>$code,'msg'=>$msg);
	}
	
	protected function getSuccessView($code,$msg){
		return array('status'=>'ok','code'=>$code,'msg'=>$msg);
	}
	
	public static function mergeViews($view,$view2add){
		if($view == null || !is_array($view)){
			return $view;
		}else{
			return array_merge($view, $view2add);
		}
	}
}